import request from '@/utils/request'

// 查询试卷绑定题目
export function getTiList(id) {
  return request({
    url: '/testpaper/testpaper/papertopic/'+id,
    method: 'get'
  })
}

// 查询试卷绑定题目
export function chooseTi(data,id) {
  return request({
    url: '/testpaper/testpaper/papertopicsave/'+id,
    method: 'post',
    data
  })
}

// 查询选题试卷列表
export function listTestpaper(query) {
  return request({
    url: '/testpaper/testpaper/list',
    method: 'get',
    params: query
  })
}

// 查询选题试卷详细
export function getTestpaper(id) {
  return request({
    url: '/testpaper/testpaper/' + id,
    method: 'get'
  })
}

// 新增选题试卷
export function addTestpaper(data) {
  return request({
    url: '/testpaper/testpaper',
    method: 'post',
    data: data
  })
}

// 修改选题试卷
export function updateTestpaper(data) {
  return request({
    url: '/testpaper/testpaper',
    method: 'put',
    data: data
  })
}

// 删除选题试卷
export function delTestpaper(id) {
  return request({
    url: '/testpaper/testpaper/' + id,
    method: 'delete'
  })
}

// 导出选题试卷
export function exportTestpaper(query) {
  return request({
    url: '/testpaper/testpaper/export',
    method: 'get',
    params: query
  })
}